package datachooser;

import java.io.*;
import java.net.URI;
import java.net.URL;
import java.util.*;

public class DataChooser {
    DataChooser (String input_file_path, String output_file_path) {
        ArrayList results = new ArrayList();
        try {
            Scanner input = new Scanner(new File(input_file_path));
            while (input.hasNextLine()) {
                String line = input.nextLine();
                results.add(line.split(",")[3]);
            }
        }
        catch (FileNotFoundException e) {
            System.out.println("InputFileNotFoundException");
        }
        try {
            PrintStream out = new PrintStream(new File(output_file_path));
            for (int i = 0; i < results.size(); i++) {
                out.println(results.get(i));
            }
        }
        catch (FileNotFoundException e) {
            System.out.println("OutputFileNotFoundException");
        }
    }
}
